import { ElSelect as ElSelectV2Plus, ElOption } from 'element-plus';
import type { ISelectProps } from 'element-plus';
import { registerComponent } from '@/plugins';
// import { GetAccumulatedMapType } from '@/plugins/hooks';
import * as basicsPlugin from './plugins/index';
// import { SelectAccumulateTypes } from './plugins/type';
import { withFormItem } from '@/components/el-form/plugins/form-item';
import './index.css';
import { GetOptionsType } from '@/types';

type ElSelectOptions = GetOptionsType<typeof nasl.ui.ElSelect>;

const ElSelect = registerComponent<ISelectProps & ElSelectOptions>(ElSelectV2Plus, {
  plugin: basicsPlugin,
});
const ElFormSelect = withFormItem(ElSelect, 'el-form-select');
export { ElSelect, ElOption, ElFormSelect };
export default ElSelect;
